function R = highLog(X)

    [h,w] = size(X);
    R = zeros(h,w);
    
    m = 8;
    
    for i=1:h
        for j=1:w
            s = X(i,j)*2^m;
            R(i,j) = pi / (2*agm(1,4/s,100)) - m * log(2);
        end
    end